<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Caziac: Caziac::Http::AHandleRequest Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><b>Caziac</b>::<b>Http</b>::<a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html">AHandleRequest</a>
  </div>
</div>
<div class="contents">
<h1>Caziac::Http::AHandleRequest Class Reference</h1><!-- doxytag: class="Caziac::Http::AHandleRequest" -->
<p>Handle for a Request.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_a_handle_request_8hh_source.html">AHandleRequest.hh</a>&gt;</code></p>

<p><a href="class_caziac_1_1_http_1_1_a_handle_request-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#a4f668de331d102d610ca286c5a1bd667">AHandleRequest</a> (<a class="el" href="class_caziac_1_1_tools_1_1_i_reader.html">Tools::IReader</a> *reader)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">constructor of the <a class="el" href="class_caziac_1_1_http_1_1_handle_request.html" title="Handle for a Request.">HandleRequest</a>  <a href="#a4f668de331d102d610ca286c5a1bd667"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1c8bba965d79067a0ac01645a67c052"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::~AHandleRequest" ref="ad1c8bba965d79067a0ac01645a67c052" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#ad1c8bba965d79067a0ac01645a67c052">~AHandleRequest</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">destructor of the <a class="el" href="class_caziac_1_1_http_1_1_handle_request.html" title="Handle for a Request.">HandleRequest</a> <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::multimap&lt; std::string, <br class="typebreak"/>
std::string &gt; const &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#ad0ea9eef963ee41060863dbedb4be6a7">getHeader</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">this function get the header of the Request  <a href="#ad0ea9eef963ee41060863dbedb4be6a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_caziac_1_1_http_1_1_line_request.html">LineRequest</a> const &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#a465862de848ff725b778879cd3ea3dd9">getLineRequest</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">this function get the <a class="el" href="struct_caziac_1_1_http_1_1_line_request.html" title="class for the first line of an HttpRequest">LineRequest</a> (method url version)  <a href="#a465862de848ff725b778879cd3ea3dd9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_caziac_1_1_tools_1_1_i_reader.html">Tools::IReader</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#aaf6f9b21d65ad64afaa13becb2d71119">getReader</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">this function get the Reader which read the stream  <a href="#aaf6f9b21d65ad64afaa13becb2d71119"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#a832f248171cb4006812dcfa734dca8ba">readRequestHeader</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">use the reader until it will find an empty string  <a href="#a832f248171cb4006812dcfa734dca8ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#a0da91eb580ae47dc36ec1de4af02851e">consumeHeaderLine</a> (std::string const &amp;line)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">[User Implementation]  <a href="#a0da91eb580ae47dc36ec1de4af02851e"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10dc01084c7f87ff535bbbbd8a1a58a8"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::addDescription" ref="a10dc01084c7f87ff535bbbbd8a1a58a8" args="(std::string const &amp;key, std::string const &amp;def)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_caziac_1_1_http_1_1_a_handle_request.html#a10dc01084c7f87ff535bbbbd8a1a58a8">addDescription</a> (std::string const &amp;key, std::string const &amp;def)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a description to the Header <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Handle for a Request. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a4f668de331d102d610ca286c5a1bd667"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::AHandleRequest" ref="a4f668de331d102d610ca286c5a1bd667" args="(Tools::IReader *reader)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Caziac::Http::AHandleRequest::AHandleRequest </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_caziac_1_1_tools_1_1_i_reader.html">Tools::IReader</a> *&nbsp;</td>
          <td class="paramname"> <em>reader</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>constructor of the <a class="el" href="class_caziac_1_1_http_1_1_handle_request.html" title="Handle for a Request.">HandleRequest</a> </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>reader</em>&nbsp;</td><td>the Socket reader This will set attribue "_reader" for later using </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0da91eb580ae47dc36ec1de4af02851e"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::consumeHeaderLine" ref="a0da91eb580ae47dc36ec1de4af02851e" args="(std::string const &amp;line)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Caziac::Http::AHandleRequest::consumeHeaderLine </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&nbsp;</td>
          <td class="paramname"> <em>line</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>[User Implementation] </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>line header like "Content-length : 78" This function parse a line and add a definition to the header with the addDescription function. The header is a multimap so when you call three times addDescription with the sames key but different definition this will save all the 3 values. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad0ea9eef963ee41060863dbedb4be6a7"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::getHeader" ref="ad0ea9eef963ee41060863dbedb4be6a7" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::multimap&lt;std::string, std::string&gt; const&amp; Caziac::Http::AHandleRequest::getHeader </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this function get the header of the Request </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the header</dd></dl>
<p>This function return the header parsed by the user with the consumeHeaderLine method. This member function is for consulting. </p>

</div>
</div>
<a class="anchor" id="a465862de848ff725b778879cd3ea3dd9"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::getLineRequest" ref="a465862de848ff725b778879cd3ea3dd9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_caziac_1_1_http_1_1_line_request.html">LineRequest</a> const&amp; Caziac::Http::AHandleRequest::getLineRequest </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this function get the <a class="el" href="struct_caziac_1_1_http_1_1_line_request.html" title="class for the first line of an HttpRequest">LineRequest</a> (method url version) </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the line request </dd></dl>
<dl class="warning"><dt><b>Warning:</b></dt><dd>call readRequestHeader before to set the <a class="el" href="struct_caziac_1_1_http_1_1_line_request.html" title="class for the first line of an HttpRequest">LineRequest</a> attributes</dd></dl>
<p>This member function is only for consulting values. </p>

</div>
</div>
<a class="anchor" id="aaf6f9b21d65ad64afaa13becb2d71119"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::getReader" ref="aaf6f9b21d65ad64afaa13becb2d71119" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_caziac_1_1_tools_1_1_i_reader.html">Tools::IReader</a>* Caziac::Http::AHandleRequest::getReader </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>this function get the Reader which read the stream </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the reader </dd></dl>

</div>
</div>
<a class="anchor" id="a832f248171cb4006812dcfa734dca8ba"></a><!-- doxytag: member="Caziac::Http::AHandleRequest::readRequestHeader" ref="a832f248171cb4006812dcfa734dca8ba" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Caziac::Http::AHandleRequest::readRequestHeader </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>use the reader until it will find an empty string </p>
<p>This function consume the reader like this:</p>
<ul>
<li>read the first three world to fill the 3 <a class="el" href="struct_caziac_1_1_http_1_1_line_request.html" title="class for the first line of an HttpRequest">LineRequest</a> fields: method url version</li>
<li>call consumeHeaderLine with the line until the line returned by the reader is empty </li>
</ul>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_a_handle_request_8hh_source.html">AHandleRequest.hh</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated on 12 Sep 2011 for Caziac by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>
